<template>
  <div>
    <el-table :data="tableData"
              border
              style="width: 100%"
              height="500">
      <el-table-column  prop="money"
                        label="金额"
                       align="center">
      </el-table-column>
      <el-table-column prop="moneyBefore"
                       label="交易前金额"
                       align="center">
      </el-table-column>
      <el-table-column prop="moneyAfter"
                       label="交易后金额"
                       align="center">
      </el-table-column>
      <el-table-column prop="description"
                       label="交易说明"
                       align="center">
      </el-table-column>
      <el-table-column prop="tradingTime"
                       label="交易时间"
                       align="center">
      </el-table-column>
    </el-table>
    <el-row type="flex"
            align="middle"
            style="text-align: center">
      <el-col>
        <el-pagination @current-change="getbalance()"
                       :current-page.sync="pageNum"
                       :page-size="pageSize"
                       layout="total, prev, pager, next"
                       :total="total">
        </el-pagination>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  
  data () {
    return {
      pageNum: 1,
      pageSize: 5,
      total: 0,
      tableData: [],
      // 初始化分页参数
      pageparm: {
        currentPage: 1,
        pageSize: 5,
        total: 0,
      },
      tableData:[{
        money:'+1000',
        moneyBefore:'9999999000',
        moneyAfter:'10000000000',
        description:'投资',
        tradingTime:'2022-05-03'
      },
      {
        money:'-3000',
        moneyBefore:'9999998000',
        moneyAfter:'9999995000',
        description:'医药购入',
        tradingTime:'2022-05-04'

      }]
    }
  },
   //创建完毕
  created() {
    // 获取表单数据
    this.getrefund();
    // this.tableData = localStorage.getItem("successData");
  },
 methods: {
    
     // 分页插件事件
    callFather(parm) {
      this.pageparm.currentPage = parm.currentPage;
      this.pageparm.pageSize = parm.pageSize;
      this.getdata();
    },
  },
  
}
</script>

<style scoped>
</style>
